package com.lin.missyou.bo;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class OrderMessageBO {

    private Long orderId;
    private Long userId;
    private Long couponId;
    private String message;


    public OrderMessageBO(String message) {
        this.message = message;
        this.parse();
    }

    private void parse() {
        String[] keys = this.message.split(":");
        this.orderId = Long.valueOf(keys[0]);
        this.userId = Long.valueOf(keys[1]);
        this.couponId = Long.valueOf(keys[2]);
    }
}
